home *** CD-ROM | disk | FTP | other *** search
- #ifndef __SQUARE_H
- #define __SQUARE_H
-
- // -[Keep_Heading]-
-
-
- // -[Copyright_Mesg]-
- // --------------------------------------------------------------- //
- // (c) Copyright 1993-1994. Step Ahead Software Pty Limited. All rights reserved.
- // Class Header Filename: SQUARE.h
- // Description:
- // Implements a square object. Uses the Rectangle function.
- // --------------------------------------------------------------- //
- #define CC_GEN 1
- #include "SHAPE.h"
-
- #include "genclsid.h"
-
-
- // -[Keep_h_Extras]-
-
-
- // -[Class_Dec]-
- class Square;
- typedef Square * PSquare;
- typedef Square & RSquare;
- typedef Square * & RPSquare;
- typedef const Square * PCSquare;
- typedef const Square & RCSquare;
-
- class Square : public Shape
- {
- // -[Keep_Class_Extras]-
-
-
- // -[Member_Data_Decs]-
- public:
- protected:
-
- // Length of the sides of the square.
- int SideLength;
- private:
-
-
- // -[Member_Function_Decs]-
- public:
-
- Square(int InitX, int InitY, int InitSide);
-
- virtual hashValueType hashValue() const;
-
- virtual classType isA() const;
-
- virtual int isEqual(const Object& testObject) const;
-
- virtual char * nameOf() const;
-
- virtual void printOn(Rostream outputStream) const;
-
- virtual void Show(HDC hDC);
- protected:
- private:
-
-
- // -[Persistent_1]-
- // OWL1.0 Streamability
- public:
- Square(StreamableInit); // Used to create a new object
- static PTStreamable build();
- protected:
- virtual Pvoid read(Ripstream is); virtual void write(Ropstream os);
- private:
- virtual const Pchar streamableName() const;
-
- };
-
- // -[Persistent_2]-
- // OWL1.0 Streamability
- inline Ripstream operator >> ( Ripstream is, RSquare cl )
- { return is >> (RTStreamable)cl; }
- inline Ripstream operator >> ( Ripstream is, RPSquare cl )
- { return is >> (RPvoid)cl; }
- inline Ropstream operator << ( Ropstream os, RCSquare cl )
- { return os << (RTStreamable)cl; }
- inline Ropstream operator << ( Ropstream os, PCSquare cl )
- { return os << (PTStreamable)cl; }
-
-
- // -[Keep]-
-
-
- // -[Global_Data_Decs]-
-
-
- // -[Global_Function_Decs]-
-
- // -[Function_Defs]-
-
- // -[End_Cond]-
- #endif __SQUARE_H